package cn.itsy.service.warnrule;

import cn.itsy.dao.warnrule.WarnRuleDao;
import cn.itsy.pojo.ResultPojo;
import cn.itsy.pojo.Warnrule;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @description:
 * @author: MisterGay
 * @date: 2019-06-03 15:59
 */
@Service(value = "warnRuleServiceimpl")
public class WarnRuleServiceimpl implements WarnRuleService {
    @Resource(name = "warnRuleDaoimpl")
    private WarnRuleDao warnRuleDao;

    @Override
    public List<Warnrule> queryWarnruleAll(String sql) {
        List<Warnrule> warnrules = this.warnRuleDao.queryWarnruleAll(sql);
        return warnrules;
    }

    @Override
    public void insertWarnrule(String sql, Warnrule warnrule) {
        this.warnRuleDao.insertWarnrule(sql, warnrule);
    }

    @Override
    public void updateWarnrule(String sql, Warnrule warnrule) {
        this.warnRuleDao.updateWarnrule(sql, warnrule);
    }

    @Override
    public void deleteWarnrule(String sql, Warnrule warnrule) {
        this.warnRuleDao.deleteWarnrule(sql, warnrule);
    }

    @Override
    public List<ResultPojo> queryResultPojoById(String sql, Integer id) {
        List<ResultPojo> resultPojos = this.warnRuleDao.queryResultPojoById(sql, id);
        return resultPojos;
    }
}
